<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>02_元素消失方法</title>
    <style>
        div {
            width: 200px;
            height: 200px;
        }

        .d1 {
            background-color: lightgreen;
        }

        .d1:hover {
            display: none;
        }

        .d2 {
            background-color: lightpink;
        }

        .d2:hover {
            transform: scale(0);
        }

        .d3 {
            background-color: lightcoral;
            border: 5px solid black;
        }

        .d3:hover {
            background-color: #fff;
        }

        .d4 {
            background-color: lightsalmon;
        }

        .d4:hover {
            /*opacity: 0.5;*/
            opacity: 0;
        }
    </style>
</head>
<body>
<div class="d1">111</div>
<div class="d2">222</div>
<div class="d3">333</div>
<div class="d4">444</div>
</body>
</html>